﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:ec="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions" 
    xmlns:System="clr-namespace:System;assembly=mscorlib" 
    x:Class="JasonTools.Calendar"
    xmlns:JasonTools="clr-namespace:JasonTools"
    Foreground="Black"
    mc:Ignorable="d"
    Height="Auto" d:DesignWidth="480">

    <UserControl.Resources>
        <JasonTools:DateTimeToStringConverter x:Key="DateTimeToStringConverter"/>
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot" >
        <Grid x:Name="grid" >
            <Grid.RowDefinitions>
            	<RowDefinition Height="90" />
            	<RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <Rectangle Grid.RowSpan="3" Fill="White"/>
            <JasonTools:MonthSlider x:Name="monthSlider" SelectedMonthChanged="MonthSlider_SelectedMonthChanged" />
            <Grid x:Name="weekdayTitleGrid" Grid.Row="1" HorizontalAlignment="Center" Margin="0,0,0,12">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="64"/>
                    <ColumnDefinition Width="64"/>
                    <ColumnDefinition Width="64"/>
                    <ColumnDefinition Width="64"/>
                    <ColumnDefinition Width="64"/>
                    <ColumnDefinition Width="64"/>
                    <ColumnDefinition Width="64"/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" x:Name="sundayTitle" Text="{Binding Converter={StaticResource DateTimeToStringConverter}, ConverterParameter='ddd'}" HorizontalAlignment="Center"/>
                <TextBlock Grid.Column="1" x:Name="mondayTitle" Text="{Binding Converter={StaticResource DateTimeToStringConverter}, ConverterParameter='ddd'}" HorizontalAlignment="Center"/>
                <TextBlock Grid.Column="2" x:Name="tuesdayTitle" Text="{Binding Converter={StaticResource DateTimeToStringConverter}, ConverterParameter='ddd'}" HorizontalAlignment="Center"/>
                <TextBlock Grid.Column="3" x:Name="wednesdayTitle" Text="{Binding Converter={StaticResource DateTimeToStringConverter}, ConverterParameter='ddd'}" HorizontalAlignment="Center"/>
                <TextBlock Grid.Column="4" x:Name="thursdayTitle" Text="{Binding Converter={StaticResource DateTimeToStringConverter}, ConverterParameter='ddd'}" HorizontalAlignment="Center"/>
                <TextBlock Grid.Column="5" x:Name="fridayTitle" Text="{Binding Converter={StaticResource DateTimeToStringConverter}, ConverterParameter='ddd'}" HorizontalAlignment="Center"/>
                <TextBlock Grid.Column="6" x:Name="saturdayTitle" Text="{Binding Converter={StaticResource DateTimeToStringConverter}, ConverterParameter='ddd'}" HorizontalAlignment="Center"/>
            </Grid>
            <Grid x:Name="matrixGrid" Grid.Row="2" HorizontalAlignment="Center" Margin="0,0,0,12">
                <Grid.ColumnDefinitions>
                	<ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                	<RowDefinition Height="Auto"/>
                	<RowDefinition Height="Auto"/>
                	<RowDefinition Height="Auto"/>
                	<RowDefinition Height="Auto"/>
                	<RowDefinition Height="Auto"/>
                	<RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
            </Grid>
        </Grid>
    </Grid>

</UserControl>
